// import { TOKEN_KEY } from '@/constants'

import { TOKEN_KEY } from "@/constants"
import Cookies from "js-cookie"

// export const getToken = () => {
//   return localStorage.getItem(TOKEN_KEY)
// }

// export const setToken = (token: string) => {
//   localStorage.setItem(TOKEN_KEY, token)
// }

// export const removeToken = () => {
//   localStorage.removeItem(TOKEN_KEY)
// }

//获取本地token
export const getLocalToken=() => {
return Cookies.get(TOKEN_KEY)
}

//设置本地token
export const setLocalToken=(token:string) => {
  Cookies.set(TOKEN_KEY,token)
}

//删除本地token
export const removeLocalToken=() => {
  Cookies.remove(TOKEN_KEY)
}